<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<title><s:text name="计量单位" />
		</title>
		<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/public.css">
		<script type="text/javascript" src="<%= request.getContextPath() %>/js/sorttable.js"></script>
		<script language="JavaScript" src="<%= request.getContextPath() %>/js/public.js"></script>
		<script type="text/javascript" src="<%= request.getContextPath() %>/js/date1.js"></script>
		<script language="JavaScript"
			src="${pageContext.request.contextPath}/js/selectrow.js"></script>
			<script language="JavaScript"
			src="${pageContext.request.contextPath}/js/ajax.js"></script>
		<script type="text/javascript">
	function selectInfo(parentId, childId, parentName, childName) {
		if (window.opener) {
			var pId = window.opener.document.getElementById(parentId);
			if (pId != null) {
				pId.value = childId;
			}
			var pName = window.opener.document.getElementById(parentName);
			if (pName != null) {
				pName.value = childName;
			}
			window.close();
		}
	}
	
	
</script>
	</head>
	<body>
		<div id="info_all">
			<div id="info_top">
				<s:text name="计量单位" />
			</div>
			<!-- 主输入区 -->

			<div id="info_main">
				<s:form action="selectMeasure.action" method="post"
					theme="simple">
					<div id="select">
						<hr>
						<table>
							<tr>
								<td>
									<s:text name="代码"></s:text>
									&nbsp;
								</td>
								<td>
									<s:textfield name="measureunit.measureUnitCode" size="12"></s:textfield>
									&nbsp;&nbsp;&nbsp;
								</td>
								<td>
									<s:text name="名称"></s:text>
									&nbsp;
								</td>
								<td>
									<s:textfield name="measureunit.measureUnitName" size="12"></s:textfield>
									&nbsp;&nbsp;&nbsp;
								</td>
							</tr>
						</table>
					</div>
					<div class="sele">
						<s:submit value="查询" onfocus="this.blur()"
							onmouseover="this.className='btnover'"
							onmouseout="this.className='btnout'" id="btnsize"></s:submit>

						<input type="reset" value="重置" onFocus="this.blur()"
							onmouseover="this.className='btnover'"
							onmouseout="this.className='btnout'" class="btnsize" />
						<hr>
					</div>
				</s:form>
				<!-- 信息显示栏 -->
				<div id="info_info0">
					<table id="info_table" width="500px" cellspacing=1px
						cellpadding=1px class="sortable">
						<thead>
							<tr>
								<!--<th>
									&nbsp;
								</th>
								--><th width="100px">
									<s:text name="代码"></s:text>
								</th>
								<th width="100px">
									<s:text name="名称"></s:text>
								</th>
								<th width="100px">
									<s:text name="换算率"></s:text>
								</th>
								<th width="100px">
									<s:text name="类别"></s:text>
								</th>
								<th width="120px">
									<s:text name="是否默认"></s:text>
								</th>
							</tr>
						</thead>
						<tbody>
							<s:form id="delrow" theme="simple">
								<s:if test="!measureDTOList.isEmpty">
									<s:iterator value="measureDTOList" status="status">
									<s:if test="rowIndex in {null}">
									<tr ondblclick="selectInfo('unitId','<s:property value="measureunit.measureUnitId"/>','unitName','<s:property value="measureunit.measureUnitName"/>')">
									</s:if>									
									<s:else>
									<tr ondblclick="multiChildToParent('${rowIndex}','measureUnitId','<s:property value="measureunit.measureUnitId"/>','measureUnitName','<s:property value="measureunit.measureUnitName"/>')">
									</s:else>
										
											<!--<td>
												<input type="radio" name="radio1"
													onclick="selectInfo('groupId','<s:property value="measureUnitId"/>','groupName','<s:property value="measureUnitName"/>')" />
											</td>
											--><td>
												<s:property value="measureunit.measureUnitCode" />
											</td>
											<td>
												<s:property value="measureunit.measureUnitName" />
											</td>
											<td>
												<s:property value="measureunit.rates" />
											</td>
											<td>
												<s:property value="measuregroup.measureGroupName" />
											</td>
											<td>
												<s:if test="measureunit.isdefault == 0"> 否</s:if>
												<s:elseif test=" measureunit.isdefault == 1">是</s:elseif>
											</td>
									</s:iterator>
								</s:if>
							</s:form>
						</tbody>
						<tfoot>
						</tfoot>
					</table>
					<script language="javascript">
	//("表格名称","奇数行背景","偶数行背景","点击后背景");
	mouseclick("info_table", "#ffffff", "#ffffff", "#e6f0fd");
	//("表格名称","奇数行背景","偶数行背景");
	//setcolor("t","#ffffff","#ffffff");
</script>
				</div>
			</div>
		</div>
	</body>
</html>